package com.winner.data.entity.request;

import javax.validation.constraints.NotNull;

import com.winner.data.entity.validate.Update;

import lombok.Data;

/**
 * 分组校验对象
 *
 * Controller对于修改的接口加 @Validated(value = Update.class) @RequestBody UserDTO userDTO , 这样就只对修改的接口入参字段有Update.class的字段进行校验
 *
 * @author wangxinle5
 * @since 2022-12-26
 */
@Data
public class UserDto {

    @NotNull(message = "主键id不能为空", groups = {Update.class})
    private Long id;

    /** 姓名 */
    private String name;
}
